<?php
session_start();
      if (isset($_SESSION['k_username'])) {
?>
<html>
<head>
<title >Logs</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<style type="text/css">
<!--BODY {
	background-color: #EBEBEB;
	margin-left: 20px;
	margin-top: 20px;
	margin-right: 0px;
	margin-bottom: 0px;
	font-size: 90%;
}
TD{
	font-family: Verdana, Helvetica, sans-serif;
 	font-size: 12px
}
H1 {
	font : bold 14pt  Verdana, Tahoma, sans-serif;
	text-align : left;
	margin-bottom : 0;
	margin-left : 0;
	margin-right : 0;
	margin-top : 0;
}
H1.mess {
	font : bold 14pt Verdana, Tahoma, sans-serif;
	text-align : center;
	color : red;
	margin-bottom : 0;
	margin-left : 0;
	margin-right : 0;
	margin-top : 0;
}
TR.data{
	background : #A6A6A6;
	font-family: Verdana, Helvetica, sans-serif;
 	font-size: 12px
}
TR.dataheader{
	font-family: Verdana, Helvetica, sans-serif;
	background : #808080;
	font-weight : bold;
	text-align : center;
	font-size: 12px
}
H2{
	font : bold 13px Verdana, Tahoma, sans-serif;
	text-align : center;
	margin-bottom : 0;
	margin-left : 0;
	margin-right : 0;
	margin-top : 0;
}
P {
	margin : 3;
}
A {
	font: Verdana, Tahoma, sans-serif;
	color : blue;
}
A:HOVER {
	font: Verdana, Tahoma, sans-serif;
	color : red;
	text-decoration : underline;
}
/*A:LINK {
text-decoration : none;
}
*/
A:VISITED {
	font: Verdana, Tahoma, sans-serif;
	text-decoration : none;
}
A.menu {
	font: bold 12px Verdana, Tahoma, sans-serif;
	color : #B75E0B;
	text-decoration : none;
}
A.menu:HOVER {
	font: Verdana, Tahoma, sans-serif;
	color : Navy;
}
A.menuACT {
	font: bold 12px Verdana, Tahoma, sans-serif;
	color : red;
	text-decoration : none;
}
/* FORM CLASSES */
.INPUTmy {
	border : 1px solid #000080;
	background : White;
	font-family : Courier New;
	font-size : 12px;
}
.INPUTmyERR {
	border : 1px solid Black;
	font-family : Courier New;
	font-size : 12px;
	background : #CC6633;
}
.INPUTmyACT {
	border : 1px solid #990033;
	background : #FFFFCC;
	font-family : Courier New;
	font-size : 12px;
	color : #000099;
}
.BUTTONmi {
	font-family: Verdana, Tahoma, sans-serif;
	font-size: 12px;
	color: black ;
	background-color: #EBEBEB;
	border: 1px solid Black;
	width : 70px;
}
.BUTTONmySmall {
	font-family: Verdana, Tahoma, sans-serif;
	font-size: 12px;
	color: black ;
	background-color: #CCCCCC;
	border: 1px solid Black;
}
.ERROR_HEADER{
	color: red;
	font : bold;
	text-align : center;
}
.ERROR_ELEMENT{
	color: red ;
}
/* END FORM CLASSES*/
.header {
	color : Teal;
	text-align : center;
	font : bold 13px;
}
-->
</style>

<style type="text/css">
<!--
.Estilo1 {font-size: 24px}
-->
</style>
</head>
<body>
<div id="round"><div id="container">
 <div id="content" class="column span-14">
<?php
include ("conexion.inc.php");
$link = Conectarse();
mysql_select_db("gotica_sociosgotica",$link);
?>

<div align="center" class="Estilo1">LOGS</div>
<table  width="100%" border="0" cellspacing="2" cellpadding="2" align="center">
<tr align="center" class="dataheader" >
<td>Id Logs</td>
<td>Socio Modificado</td>
<td>Modificado Por</td>
<td>Fecha Modificacion</td>
<td>Tipo Modificacion</td>
</tr>

<?php 
$sql="SELECT * FROM logs ORDER BY idlogs DESC LIMIT 100";
$result=mysql_query($sql,$link);
while ($row = mysql_fetch_array($result))
{
echo"<tr align=\"center\" class=\"data\" >";
echo "<td>".$row['idlogs']."</td>";
$sql1="SELECT * FROM socios WHERE idsocio=".$row['idsocio'];
$result1=mysql_query($sql1,$link);
$row1 = mysql_fetch_array($result1);
echo "<td>".$row1['Nombres']." ".$row1['ApPaterno']." ".$row1['ApMaterno']."</td>";
echo "<td>".$row['modificadopor']."</td>";
echo "<td>".$row['fechamod']."</td>";
echo "<td>".$row['tipoed']."</td>";
echo "</tr>";}
?>
</table>
<div align="center" >
<a href="index2.php">Inicio</a></div>
<?php
if($_SESSION['grupo']==1){ ?>
<div align="left" >
<a href="borralog.php">Vaciar Log</a></div>
<?php } ?>
</div>
</div>
</div>
</body>
</html>
<?
}else
{
	echo "<SCRIPT LANGUAGE=\"javascript\">";
echo "location.href = \"index.php\"";
echo "</SCRIPT>";
	}
?>